package org.example.xls.mapper;

import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.xls.pojo.TestQuestion;
import org.example.xls.pojo.TestRecordVO;

import java.util.List;

@Mapper
public interface TestQuestionMapper {
    //查询试题
    @Select("select question_text from testQuestion where test_id = #{testId}")
    List<TestQuestion> getTestQuestion(Integer testId);
    //查询数量
    @Select("select count(*) from testQuestion where test_id = #{testId}")
    Integer getCount(Integer testId);

    //分页查询
    @Select("select * from testrecords where open_id = #{openId}")
    Page<TestRecordVO> getTestQuestionPage(String openId);
}
